﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WeatheRx.Data;

namespace WeatheRx.Web.Models
{
    public static class AdapterExtensions
    {
        public static Job ToObjectModel(this JobViewModel j)
        {
            return Mapper.Map<Job>(j);
        }

        public static JobViewModel ToViewModel(this Job j)
        {
            return Mapper.Map<JobViewModel>(j);
        }

        public static Applicant ToObjectModel(this ApplicantViewModel a)
        {
            return Mapper.Map<Applicant>(a);
        }

        public static ApplicantViewModel ToViewModel(this Applicant a)
        {
            return Mapper.Map<ApplicantViewModel>(a);
        }

        public static WorkOrderViewModel ToViewModel(this WorkOrder a)
        {
            return Mapper.Map<WorkOrderViewModel>(a);
        }
    }
}